package com.zfh.cloud.apis;

import com.zfh.cloud.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by 小可乐$ on 2024/9/14$ 13:40$
 * description:FeignClient的声明式接口，方便外接调用
 */
@FeignClient(value = "cloud-user")
public interface UserFeignClient{
    /**
     * 根据order表查询user数据
     * 先查询出order数据，getuserid，
     * 这里应该为：userid查询user
     * */
    @GetMapping("user/get/{userId}")
    public User findUserByUserId(@PathVariable(value = "userId") Long userId);
}
